<template>
    <van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" @click="ss" />
    <!-- 轮播图 -->
    <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="i in lbtdata" :key="image">
            <img :src="i.image_src" style="width: 100%;height: 200px;" />
        </van-swipe-item>
    </van-swipe>

    <!-- 导航 -->
    <van-grid :border="false" :column-num="4">
        <van-grid-item v-for="i in dhdata">
            <van-image :src="i.image_src" style="width: 50px;
            height: 50px;" />
        </van-grid-item>
    </van-grid>

    <!-- 楼层 -->
     <div v-for="i in lcdata">
        <img :src="i.floor_title.image_src" alt="" style="width: 100%;">
        <div v-for="ii in i.product_list">
            <img :src="ii.image_src" alt="" style="width: 120px;
            height: 120px;margin-left: 3px;float: left;">
        </div>
     </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { lbt, dh, lc } from '@/api/api';
const router = new useRouter()
let ss = () => {
    router.push('/sousuo')
}
const lbtdata = ref([])
lbt().then(res => [
    console.log('轮播图', res),
    lbtdata.value = res.data.message
])
const dhdata = ref([])
dh().then(res => [
    console.log('导航', res),
    dhdata.value = res.data.message
])
const lcdata = ref([])
lc().then(res => [
    console.log('楼层', res),
    lcdata.value = res.data.message
])
</script>

<style lang="scss" scoped></style>